#include<iostream>
#include<fcntl.h>
#include<unistd.h>

int main()
{
    int fd = open("common",O_WRONLY|O_TRUNC);
    
    char buffer[256];
    while(1)
    {
        std::cin >> buffer;
        int n = write(fd,buffer,sizeof(buffer)-1);
        if(n < 0)
        {
            break;
        }
    }

    return 0;
}